import {Component, OnInit} from '@angular/core';
import {NavController, AlertController} from 'ionic-angular';
import {ModifyDataPage} from '../modifyData/modifyData';
import {PersonPage} from '../person/person';
import {PersonalDataService} from "./personalData.service";
import {services} from "../../providers/service";

@Component({
    selector: 'page-personalData',
    templateUrl: 'personalData.html',
    providers: [PersonalDataService]
})
export class PersonalDataPage implements OnInit {

    personalDetial = {};

    constructor(public navCtrl: NavController,
                public alertCtrl: AlertController,
                public personalDataService: PersonalDataService,
                public service: services,) {
    }

    ngOnInit() {
        this.personalDetial = this.service.personalDetail;

    }

    showPopup() {
        this.navCtrl.push(ModifyDataPage);
    }

    goback() {
        this.navCtrl.pop(PersonPage);
    }
}